//
//  DontLookInfoViewController.m
//  Manager
//
//  Created by 彭凯敏 on 15/8/21.
//  Copyright (c) 2015年 52xiaoluo. All rights reserved.
//

#import "DontLookInfoViewController.h"

@interface DontLookInfoViewController ()

@property (weak, nonatomic) IBOutlet UIScrollView *scrollView;
@property (weak, nonatomic) IBOutlet UIView *contentView;


@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
@property (weak, nonatomic) IBOutlet UILabel *expectLabel;

@property (weak, nonatomic) IBOutlet UILabel *roomLabel;


@property (weak, nonatomic) IBOutlet UILabel *jobLabel;
@property (weak, nonatomic) IBOutlet UILabel *liveLabel;

@property (weak, nonatomic) IBOutlet UILabel *remarkLabel;


@property (weak, nonatomic) IBOutlet UILabel *unsignLabel;
- (IBAction)clcikPhone:(UIButton *)sender;

@end

@implementation DontLookInfoViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self baseCtlSetTitle:@"不看房详情"];
    
    
    _scrollView.contentSize = CGSizeMake(ScreenWidth,IS480?520: ScreenHeight - 63.5);
    
    [_scrollView addSubview:_contentView];
    
    
    [self resetUI];
}
- (void)resetUI
{
    if (!_orderInfo) {
        return;
    }
    
    _nameLabel.text = [_orderInfo.name judgeWithBase:@""];
    _timeLabel.text = [NSString stringWithFormat:@"预约时间：%@",[KMGetDate timeFromNum:[NSString stringWithFormat:@"%llu",_orderInfo.viewTime/1000] andFormStr:@"YYYY-MM-dd HH:mm"]];
    _expectLabel.attributedText = [[NSString stringWithFormat:@"%d",(int)_orderInfo.expectPrice]judgeAttributePrice:@"心理价位："];
    
    _jobLabel.attributedText = [_orderInfo.job judgeAttributeBase:@"职       业："];
    _liveLabel.attributedText = [_orderInfo.checkInDays judgeAttributeBase:@"入住时间："];
    
     [UIViewCategory remarkLabelWith:_remarkLabel andText:_orderInfo.remark andView:_scrollView];
    
    if (!_orderInfo.viewRooms) {
        UILabel *room = [[UILabel alloc]initWithFrame:_roomLabel.frame];
        room.lineBreakMode = NSLineBreakByWordWrapping;
        room.numberOfLines = 0;
        room.attributedText = [@"" judgeAttributeRoom:@"约看房间："];
        room.font = FontSize(14);
        [_scrollView addSubview:room];
        
    }
    else
    {
        RoomInfo *info = _orderInfo.viewRooms[0];
        
        [UIViewCategory newRoomPriceLabel:_roomLabel andInfo:info andView:_scrollView];
        
    }
    
    
    UILabel *unsign = [[UILabel alloc]initWithFrame:_unsignLabel.frame];
    [unsign setSizeWidth:_unsignLabel.sizeWidth];
    unsign.lineBreakMode = NSLineBreakByWordWrapping;
    unsign.numberOfLines = 0;
    unsign.text = [_orderInfo.unViewRemark judgeWithBase:@""];
    unsign.font = FontSize(14);
    [unsign sizeToFit];
    [_scrollView addSubview:unsign];
    
}


- (IBAction)clcikPhone:(UIButton *)sender {
}
@end
